<template>
  <view class="container" :style="{ paddingTop: getStatusBarHeight() }">
    <view class="wave-decoration"></view>
    <view class="content animate-slide-up">
      <!-- 标题区域 -->
      <view class="title-section">
        <text class="main-title">AI智能问诊</text>
      </view>

      <!-- 说明文本区域 -->
      <view class="description">
        <text class="desc-text">AI智能问诊基于中医理论知识库，结合现代人工智能技术</text>
        <text class="desc-text">通过智能对话的方式，为您提供专业的中医健康咨询和指导建议。</text>
      </view>

      <!-- 功能列表 -->
      <view class="questions">
        <view class="question-item" v-for="(item, index) in featureList" :key="index">
          <view class="question-dot"></view>
          <view class="question-text">
            <text class="highlight">{{ item.highlight }}</text>{{ item.text }}
          </view>
        </view>
      </view>

      <!-- 底部按钮区域 -->
      <view class="bottom-area">
        <text class="bottom-tip">↓ 点击下方按钮【开始咨询】</text>
        <button class="start-btn" hover-class="btn-hover" @click="startChat">
          开始咨询
        </button>
      </view>
    </view>
  </view>
</template>

<script setup>
import { ref } from 'vue'
import { getStatusBarHeight } from '@/utils/component-api'

const featureList = ref([
  { highlight: '智能对话', text: '，精准理解您的健康问题' },
  { highlight: '中医理论', text: '，专业的诊断分析' },
  { highlight: '个性化建议', text: '，贴心的养生指导' },
  { highlight: '实时互动', text: '，随时解答您的疑问' }
])

const startChat = () => {
  uni.navigateTo({
    url: '/pages/chat/index'
  })
}
</script>

<style lang="scss" scoped>
.container {
  min-height: 100vh;
  background: linear-gradient(135deg, #36D1DC 0%, #5B86E5 100%);
  position: relative;
  overflow: hidden;
  color: #fff;

  // 主背景渐变
  &::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
      radial-gradient(circle at 0% 0%, rgba(91, 134, 229, 0.8) 0%, transparent 50%),
      radial-gradient(circle at 100% 0%, rgba(54, 209, 220, 0.8) 0%, transparent 50%),
      radial-gradient(circle at 100% 100%, rgba(91, 134, 229, 0.8) 0%, transparent 50%),
      radial-gradient(circle at 0% 100%, rgba(54, 209, 220, 0.8) 0%, transparent 50%);
    z-index: 0;
  }

  // 动态装饰圆
  &::after {
    content: '';
    position: fixed;
    width: 1000rpx;
    height: 1000rpx;
    border-radius: 50%;
    background: linear-gradient(45deg, rgba(54, 209, 220, 0.1), rgba(91, 134, 229, 0.1));
    filter: blur(60rpx);
    animation: rotate 20s linear infinite;
    z-index: 1;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
}

// 动态波浪效果
.wave-decoration {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  opacity: 0.5;
  pointer-events: none;

  &::before,
  &::after {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: radial-gradient(circle at center, transparent 30%, rgba(255, 255, 255, 0.1) 70%);
    animation: wave 8s infinite linear;
    border-radius: 45%;
  }

  &::after {
    animation: wave 15s infinite linear;
    opacity: 0.5;
  }
}

.content {
  position: relative;
  z-index: 10;
  padding: 70rpx 40rpx 40rpx;
}

.title-section {
  margin-bottom: 70rpx;

  .main-title {
    font-size: 52rpx;
    font-weight: bold;
    letter-spacing: 2rpx;
    text-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.1);
  }
}

.description {
  background: rgba(255, 255, 255, 0.15);
  padding: 40rpx;
  border-radius: 24rpx;
  margin-bottom: 50rpx;
  backdrop-filter: blur(10rpx);
  box-shadow: 0 8rpx 32rpx rgba(31, 38, 135, 0.1);
  border: 1rpx solid rgba(255, 255, 255, 0.18);

  .desc-text {
    display: block;
    font-size: 28rpx;
    line-height: 1.8;
    margin-bottom: 24rpx;
    letter-spacing: 0.5rpx;

    &:last-child {
      margin-bottom: 0;
    }
  }
}

.questions {
  margin-bottom: 70rpx;

  .question-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 36rpx;
    transform: translateX(0);
    transition: transform 0.3s ease;

    &:hover {
      transform: translateX(10rpx);
    }

    .question-dot {
      width: 14rpx;
      height: 14rpx;
      background: #FFD700;
      border-radius: 50%;
      margin-top: 12rpx;
      margin-right: 24rpx;
      flex-shrink: 0;
      box-shadow: 0 0 10rpx rgba(255, 215, 0, 0.5);
    }

    .question-text {
      font-size: 30rpx;
      line-height: 1.6;

      .highlight {
        color: #FFD700;
        font-weight: 600;
        text-shadow: 0 0 10rpx rgba(255, 215, 0, 0.3);
      }
    }
  }
}

.bottom-area {
  text-align: center;

  .bottom-tip {
    display: block;
    font-size: 26rpx;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 30rpx;
    letter-spacing: 1rpx;
  }

  .start-btn {
    width: 100%;
    height: 96rpx;
    line-height: 96rpx;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 34rpx;
    font-weight: bold;
    border-radius: 48rpx;
    border: 2rpx solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5rpx);
    transition: all 0.3s ease;

    &.btn-hover {
      opacity: 0.9;
      transform: scale(0.98);
      background: rgba(255, 255, 255, 0.25);
      box-shadow: 0 0 20rpx rgba(255, 255, 255, 0.2);
    }
  }
}

.animate-slide-up {
  animation: slideUp 1s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes slideUp {
  from {
    transform: translateY(60rpx);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes rotate {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }

  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes wave {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}
</style>